import torch
import torch.nn as nn
class Perceptron(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(1, 1)  # 一个全连接层，输入和输出维度都是1
    def forward(self, x):
        y = self.fc(x)
        return y
